/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 苏李涛
 * Date: 2024-04-26
 * Time: 16:44
 */
public class Fraction {
    public static void main(String[] args) {
        double sum = 0.0;
        int sign = 1;
        for (int i = 1; i <= 100; i++) {
            sum += 1.0 * sign / i;
            sign = -sign;
        }
        System.out.println(sum);
    }
}
